﻿<?php
ob_start();
if(isset($_SERVER['HTTP_APPVERSION'])){
include "./siteinfo.php";
}else{
 if(!file_exists("./install/install.lock")){
header('location:./install');
exit;
 }else{
include "./siteinfo.php";
 }
}
//连接数据库
$localhost=mysql_connect($sqlhost,$sqluser,$sqlpass)or die("无法连接服务器");
mysql_select_db($sqldata,$localhost);
?>
<html>
<head>
<meta content="width=device-width,user-scalable=no" name="viewport">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="1;url=user.php">
<title>平台小提示 - <?php echo $sitename; ?></title>
<link rel="stylesheet" type="text/css" href="css/register.css"/>
</head>
<body>
<div class='signup_container'>

    <h1 class='signup_title'><?php echo $sitename; ?>小提示!</h1>
<p><font size="4">
<?php
$user=$_POST['user'];
$pass=md5($_POST['pass']);
$mima=$_POST['mima'];
$mysql=mysql_query("SELECT * FROM user WHERE user='$user'");
$sql=mysql_fetch_array($mysql);
if ($user!=$sql['user']){
echo "该账号不存在，请先<a href='reg.php'>注册</a>";
}elseif($user==""){
echo "账号不能为空";
}elseif($pass=="d41d8cd98f00b204e9800998ecf8427e"){
echo "密码不能为空";
}elseif($pass!=$sql['pass']){
echo "密码错误";
}elseif(!$sql[vip]){
	echo "请先激活账号！";
	echo '<script language=\'javascript\'>alert(\'请先激活账号！\'); window.location.href="jh.php?id='.$sql[id].'";</script>';
}else{
echo "登陆成功";
setcookie("SHANIUUSER", "$user");
setcookie("SHANIUPASS", "$pass");
}
?><br />1秒后跳转页面</font></p></div>
</body>
</html>